package com.ruoyi.quartz.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.quartz.domain.YongyouXsht;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 销售合同Mapper接口
 * 
 * @author SYF
 * @date 2025-04-17
 */
public interface YongyouXshtMapper 
{
    /**
     * 查询销售合同
     * 
     * @param orderdetailsFirstupcode 销售合同主键
     * @return 销售合同
     */
    public YongyouXsht selectYongyouXshtByOrderdetailsFirstupcode(String orderdetailsFirstupcode);

    /**
     * 查询销售合同列表
     * 
     * @param yongyouXsht 销售合同
     * @return 销售合同集合
     */
    public List<YongyouXsht> selectYongyouXshtList(YongyouXsht yongyouXsht);

    /**
     * 新增销售合同
     * 
     * @param yongyouXsht 销售合同
     * @return 结果
     */
    public int insertYongyouXsht(YongyouXsht yongyouXsht);

    /**
     * 修改销售合同
     * 
     * @param yongyouXsht 销售合同
     * @return 结果
     */
    public int updateYongyouXsht(YongyouXsht yongyouXsht);

    /**
     * 删除销售合同
     * 
     * @param orderdetailsFirstupcode 销售合同主键
     * @return 结果
     */
    public int deleteYongyouXshtByOrderdetailsFirstupcode(String orderdetailsFirstupcode);

    public int deleteYongyouXshtByDate(@Param("startDate") String startDate, @Param("endDate")String endDate);

    public List<YongyouXsht> selectYongyouXshtByDate(@Param("vouchdate") String vouchdate);

    /**
     * 批量删除销售合同
     * 
     * @param orderdetailsFirstupcodes 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYongyouXshtByOrderdetailsFirstupcodes(String[] orderdetailsFirstupcodes);

    public int clearXsht();

    public List<Map<String,Object>> getYjgXsht(@Param("year") String year);

    public List<Map<String,Object>> getOtherXsht(@Param("year") String year);

    public List<Map<String,Object>> getDetailXsht(@Param("year") String year);

    public List<Map<String,Object>> selectJianLan(@Param("year") String year,@Param("day") String day);

    @Select("${sql}")
    public void impAraeCustomers(@Param("sql") String sql);

    @Select("${sql}")
    public List<Map<String,Object>> selectAraeCustomers(@Param("sql") String sql);
}
